﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.TemplateMethod.Interest
{
    /// <summary>
    /// 理财用户
    /// </summary>
    public class VipUser : BaseUser
    {
        /// <summary>
        /// 计算利息
        /// </summary>
        /// <param name="currBalance">余额</param>
        /// <returns></returns>
        public override decimal CalculateInterest(decimal balance)
        {
            return (decimal)0.07 * balance;
        }

        /// <summary>
        /// 展示余额和利息
        /// </summary>
        /// <returns></returns>
        public override void Show(string userName, decimal currBalance, decimal interest)
        {
            Console.WriteLine($"尊贵的用户，{userName}您好：\n您的余额为：{currBalance},计算后的利息为：{interest}");
            Console.WriteLine($"理财有风险，入行需谨慎");
        }
    }
}
